package kr.co.xosoft.adapter;

import java.util.List;

import kr.co.xosoft.view.ServerChkCTView;
import kr.co.xosoft.vo.ServerChkVO;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class ServerChkListAdapter extends BaseAdapter{
	private Context context;
	private List<ServerChkVO> list;

	public ServerChkListAdapter(Context context, List<ServerChkVO> list) {
		this.context = context;
		this.list = list;
	}
	
	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ServerChkCTView view = null;
		if(convertView == null){
			view = new ServerChkCTView(context, list.get(position));
		}else{
			view = (ServerChkCTView)convertView;
		}
		return view;
	}
}
